package com.springboot.example.monitor;

import com.springboot.example.monitor.application.WebConfig;
import com.springboot.example.monitor.mapper.UserMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import javax.annotation.Resource;

/**
 * 作者: guo yao
 * 日期: 2016年01月14日
 * 时间: 下午14:45
 */
//@EnableScheduling
@EnableWebMvc  // 禁用默认的mvc配置路径
@SpringBootApplication
@MapperScan("com.springboot.example.monitor.mapper")
public class SpringBootServer extends WebConfig implements CommandLineRunner{

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SpringBootServer.class);
    }


    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(SpringBootServer.class);
        app.run(args);
    }

    /**
     * 启动执行的代码
     *
     * @param args
     * @throws Exception
     */
    @Override
    public void run(String... args) throws Exception {
    }


}
